//
//  ATTextCell.m
//  Postre
//
//  Created by CoderLT on 2017/6/4.
//  Copyright © 2017年 CoderLT. All rights reserved.
//

#import "ATTextCell.h"

@implementation ATTextCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end

@implementation ATTextFieldCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _textField = [[UITextField alloc] init];
        _textField.textColor = [UIColor appSubTitleColor];
        _textField.font = [UIFont appTitleFont];
        _textField.clearButtonMode = UITextFieldViewModeWhileEditing;
        _textField.tintColor = [UIColor appColor];
        [self.contentView addSubview:_textField];
        [_textField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(_textField.superview).insets(UIEdgeInsetsMake(0, 16, 0, 16));
        }];
    }
    return self;
}
@end

@implementation ATTextViewCell
+ (CGFloat)cellHeight {
    return 140;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _textView = [[ATTextView alloc] init];
        _textView.textColor = [UIColor appSubTitleColor];
        _textView.font = [UIFont appTitleFont];
        _textView.tintColor = [UIColor appColor];
        [self.contentView addSubview:_textView];
        [_textView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(_textView.superview).insets(UIEdgeInsetsMake(0, 16, 0, 16));
        }];
    }
    return self;
}
@end
